package com.broadsoft.platform.wfengine.runtime;

import com.broadsoft.platform.wfengine.DecisionType;
import com.broadsoft.platform.wfengine.EndNodeType;
import com.broadsoft.platform.wfengine.GeneralNodeType;
import com.broadsoft.platform.wfengine.JoinType;
import com.broadsoft.platform.wfengine.NodeType;
import com.broadsoft.platform.wfengine.SplitType;
import com.broadsoft.platform.wfengine.StartNodeType;
import com.broadsoft.platform.wfengine.SubflowType;

public interface NodeExecutionService {
    /**
     */
    public NodeType executeStartNode(StartNodeType _node, WfContext flowContext) ;

    public NodeType executeEndNode(EndNodeType _node, WfContext flowContext);

    public NodeType executeGeneralNode(GeneralNodeType _node, WfContext flowContext) ;

    public NodeType executeDecisionNode(DecisionType _node, WfContext flowContext);

    public NodeType executeSubflowNode(SubflowType _node, WfContext flowContext);
    
    
    public NodeType executeTimerNode(NodeType _node, WfContext flowContext);
    

    public NodeType executeExternalNode(NodeType _node, WfContext flowContext);
    /**
     * 
     * FIXME: <A brief description of what the method does.> 
     * FIXME: Algorithm: <MUST exist if the method is more than 10 lines. Remove if it is simple.>
     * <An Algorithm in pure English, describing the logic used in the implementation. 
     * This should not contain to any Syntax of Java, in fact, it should be language independent, 
     * and should be targeted to any new comer in the maintenance of the code.>
     *
     * @param _node
     * @param flowContext
     * @return return one of the dest node and in another thread, it will invoke executeNode.
     */
    public NodeType executeSplitNode(SplitType _node, WfContext flowContext);
    
    public NodeType executeJoinNode(JoinType _node, WfContext flowContext); 

}
